package cn.edu.ctbu.myfirstweb.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Table;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity(name = "tb_student")
@Data//自动生成getter和setter
@NoArgsConstructor//生成无参构造器
@AllArgsConstructor//生成全参构造器
public class Student {
    @Id//主键
    @GeneratedValue(strategy = GenerationType.IDENTITY)//此处主键为自增，若不设置主键的自增策略则其默认为auto，主键
    private Long id;

    private String name;
    private String password;
    private String sex;
    private Long num;
}
